# # encoding=utf-8
# # author:梁子龙
from comment.modules import db
from datetime import datetime


class Order(db.Model):
    __tablename__ = 't_order'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    order_id = db.Column(db.String(64), comment='订单号')
    order_name = db.Column(db.String(128), comment='订单名')
    order_status = db.Column(db.String(30), comment='订单状态')
    order_price = db.Column(db.Integer, comment='订单价格')
    create_time = db.Column(db.DateTime, default=datetime.now(), comment='创建时间')
    update_time = db.Column(db.DateTime, default=datetime.now(), onupdate=datetime.now(), comment='更新时间')

    def __repr__(self):
        return f"当前的专案号{self.orderId},当前的专案名{self.orderName}"
